//#include<bits/stdc++.h>
#include <iostream>
#include <string>
using namespace std;

int su[100000005], cnt = 0;
bool vis[100000005];

void init_o(int n) {
	for (int i = 2;i <= n;i++) {
		if (vis[i] == false)
			su[++cnt] = i;
		for (int j = 1;j <= cnt && su[j] * i <= n;j++) {
			vis[su[j] * i] = true;
			if (i % su[j] == 0)
				break;
		}
	}
	return;
}

int main()
{
	int n;
	cin >> n;
	init_o(n);
	cout << cnt << endl;
	return 0;
}